// 当前环境
const ENV = process.env.NODE_ENV
// const ENV = 'production'
// 基本请求
let _BASE_URL = ''
// 跳转前台商品详情页路径
let _FONT_GOODS_DETAIL_URL = ''
// 跳转前台首页
let _FONT_MALL_URL = ''

// 当前环境判断 测试环境
if (ENV == 'development' || ENV == 'preannouncement') {
  // 测试环境
  _BASE_URL = 'http://218.94.47.138:8907/haoxiadan/'
  // 萍
  // _BASE_URL = 'http://192.168.2.233:8886/platform/'
  // 东
  // _BASE_URL = 'http://192.168.2.47:8080/platform/'
  // 吴浪
  // _BASE_URL = 'http://192.168.2.156:8080/platform_war_exploded/'
  // 赵硕
  // _BASE_URL = 'http://192.168.2.61:8088/'
  _FONT_MALL_URL = 'http://218.94.47.138:8903'
  _FONT_GOODS_DETAIL_URL = 'http://218.94.47.138:8903/goods/detail/'
} else if (ENV == 'production') { 
  // 生产环境
  _BASE_URL = 'http://platformapi.haoxiadan.cn/PlatformApi/'
  _FONT_MALL_URL = 'https://www.haoxiadan.cn'
  _FONT_GOODS_DETAIL_URL = 'https://www.haoxiadan.cn/goods/detail/'
}

export const BASE_URL = _BASE_URL
export const FONT_GOODS_DETAIL_URL = _FONT_GOODS_DETAIL_URL
export const FONT_MALL_URL = _FONT_MALL_URL

export const API = `${BASE_URL}v3/`
export const API_FRONT = `${FONT_GOODS_DETAIL_URL}v3/`